package com.gulimall.ware.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.gulimall.common.to.WareSkuLockTo;
import com.gulimall.common.to.rabbit.WareLockTo;
import com.gulimall.common.utils.PageUtils;
import com.gulimall.ware.entity.WareSkuEntity;

import java.util.List;
import java.util.Map;

/**
 * 商品库存
 *
 * @author kkk
 * @email 2017809755@qq.com
 * @date 2022-05-17 22:04:35
 */
public interface WareSkuService extends IService<WareSkuEntity> {

    PageUtils queryPage(Map<String, Object> params);

    PageUtils queryPageSkuWare(Map<String, Object> params);

    void saveProductWare(Long itemId, Long wareId, Integer skuNum);

    Map<Long, Boolean> queryProductStock(List<Long> skuIds);

    boolean orderLockStock(WareSkuLockTo wareSkuLockTo);

    void unLockStock(WareLockTo wareLockTo);

    void closeOrder(String orderSn);
}

